package sharedGameLogic.gameData;

import java.io.Serializable;

import sharedGameLogic.enums.BattleEvent;



public class PlayerResult implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2485362347609762649L;
	private int newHealth;
	private int newEnergy;
	
	private BattleEvent action;
	
	private boolean actionSuccess;
	
	
	/**
	 * Constructor asking for the parameters needed for the client to be 
	 * able to display the results of a players action
	 * 
	 * @param health - The amount of health the player has
	 * @param energy - The amount of energy the player has
	 * @param action - The type of action the player performed, used for animation
	 * @param success - If the player succeded with his action or not
	 */
	public PlayerResult(int health, int energy, 
						BattleEvent action, boolean success){
		newHealth = health;
		newEnergy = energy;
		this.action = action;
		actionSuccess = success;

	}
	
	/**
	 * Accessor method for the current health of the players character.
	 * @return - newHealth
	 */
	public int getNewHealth(){
		return newHealth;
	}
	
	/**
	 * Accessor method for the current energy of the players character.
	 * @return - newEnergy
	 */
	public int getNewEnergy(){
		return newEnergy;
	}
	
	/**
	 * Accessor method for the enum that describes how the 
	 * action is supposed to be animated
	 * @return - action
	 */
	public BattleEvent getActionType(){
		return action;
	}
	
	/**
	 * Accessor method for the boolean that describes wheter 
	 * or not the attempted action succeded or not
	 * @return - actionSucces
	 */
	public boolean isActionSuccessful(){
		return actionSuccess;
	}
}
